import { lazy } from "react";
import {
  AppstoreOutline,
  UserOutline,
  MessageOutline,
  AppOutline,
} from "antd-mobile-icons";
const Layout=lazy(()=>import("../pages/Layout"))
const Login=lazy(()=>import("../pages/Login"))
const Home=lazy(()=>import("../pages/Home"))
const Prop=lazy(()=>import("../pages/Prop"))
const Text=lazy(()=>import("../pages/Text"))
const User=lazy(()=>import("../pages/User"))
const City=lazy(()=>import("../pages/City"))

export const handleHomes=[
    {
        path:"/",
        element:<Home></Home>,
        title:"首页",
        icon:<AppstoreOutline/>
    },
    {
        path:"/prop",
        element:<Prop></Prop>,
        title:"分类",
        icon:<UserOutline/>
    },
    {
        path:"/text",
        element:<Text></Text>,
        title:"消息",
        icon:<MessageOutline/>
    },
    {
        path:"/user",
        element:<User></User>,
        title:"个人中心",
        icon:<AppOutline/>
    }
]

export const routes=[
    {
        path:"/",
        element:<Layout></Layout>,
        children:handleHomes
    },
    {
        path:"/login",
        element:<Login></Login>
    },
    {
        path:"/city/:type",
        element:<City></City>
    }
]